Source Code Documentation Generation Using Program Execution
نویسندگان
چکیده
Automated source code documentation approaches often describe methods in abstract terms, using the words contained in the static source code or code excerpts from repositories. In this paper, we describe DynamiDoc: a simple automated documentation generator based on dynamic analysis. Our representation-based approach traces the program being executed and records string representations of concrete argument values, a return value and a target object state before and after each method execution. Then, for each method, it generates documentation sentences with examples, such as “When called on [3, 1.2] with element = 3, the object changed to [1.2]”. Advantages and shortcomings of the approach are listed. We also found out that the generated sentences are substantially shorter than the methods they describe. According to our small-scale study, the majority of objects in the generated documentation have their string representations overridden, which further confirms the potential usefulness of our approach. Finally, we propose an alternative, variable-based approach that describes the values of individual member variables, rather than the state of an object as a whole.
منابع مشابه
Towards the Software Autogeneration
Program generators are usually aimed for generation of program source code. This paper introduces the idea of software source code generation and its execution on demand that we named as Autogeneration. Autogeneration avoids generation of program files by using the possibility of scripting languages to evaluate program code from variables. There are several features that could be achieved by au...
متن کاملمکانیابی خطاهای پنهان نرم افزار با استفاده از آنتروپی متقاطع و مدلهای n-گرام
The aim is to automate the process of bug localization in program source code. The cause of program failure could be best determined by comparing and analyzing correct and incorrect execution paths generated by running the instrumented program with different failing and passing test cases. To compare and analysis the execution paths, one approach is clustering the paths according to their simil...
متن کاملVerifying the Specification-to-Code Correspondence for Abstract Data Types
Formal specification has become an important issue in the development of safety critical software. Automatic code generation from specifications in general leads to inefficient implementations. Instead, we present a verification method that allows verifying an implementation against a given specification, using specification generation from program source code. Generated specifications can be c...
متن کاملAlEx4C: Algorithm Extractor for C Program
The paper discusses a system that generates an English language text, which explains the algorithms implemented in a program written in ANSI C language. The system will help students of introductory programming courses understand C language source code. This paper discusses an approach which makes use of two methods: program slicing and text generation. Program Slicing eliminates those parts of...
متن کاملClassification of automatic software build methods
The process of creating working software from source code and other components (like libraries, database files, etc.) is called “software build”. Apart from linking and compiling, it can include other steps like automated testing, static code analysis, documentation generation, deployment and other. All that steps can be automated using a build description of some sort (e.g. script). This artic...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Information
دوره 8 شماره
صفحات -
تاریخ انتشار 2017